<!--
 * @FilePath     : /study_code/css/flex-basis.html
 * @Description  : flex-basis 设置弹性盒子尺寸
 * @Date         : 2025-04-27 14:40:58
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-27 14:46:46
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
    <style>
      .father {
        display: flex;
        width: 400px;
        height: 200px;
      }

      .box {
        width: 200px;
        height: 100px;
        flex-basis: 300px;
        background: blue;
      }

      /*
      .box width 的值就会被 flex-basis 覆盖掉
      */

      /* 轴变动 */
      .father1 {
        display: flex;
        flex-direction: column;
        width: 400px;
        height: 200px;
      }
      .box1 {
        width: 200px;
        height: 100px;
        flex-basis: 300px;
        background: red;
      }
      /* .box1 height 被解析为 300px */
    </style>
  </head>
  <body>
    <div class="father">
      <div class="box"></div>
    </div>

    <hr />
    <div class="father1">
      <div class="box1"></div>
    </div>
  </body>
</html>
